package com.ibuonline.b2b.entity;

import java.io.Serializable;

public class CompanyCreditScore implements Serializable {

	private static final long serialVersionUID = 9212054809331670019L;

	//fields
	private java.lang.Integer id;
	private java.lang.Integer companyId;
	private java.lang.String scoreItem;
	private java.lang.Integer score;
	private java.lang.String memo;
	private java.sql.Timestamp lastupdate;

	//default constructor
	public CompanyCreditScore() {
	}

	//getter
	public java.lang.Integer getId() {
		return id;
	}
	public java.lang.Integer getCompanyId() {
		return companyId;
	}
	public java.lang.String getScoreItem() {
		return scoreItem;
	}
	public java.lang.Integer getScore() {
		return score;
	}
	public java.lang.String getMemo() {
		return memo;
	}
	public java.sql.Timestamp getLastupdate() {
		return lastupdate;
	}

	//setter
	public void setId(java.lang.Integer id) {
		this.id = id;
	}
	public void setCompanyId(java.lang.Integer companyId) {
		this.companyId = companyId;
	}
	public void setScoreItem(java.lang.String scoreItem) {
		this.scoreItem = scoreItem;
	}
	public void setScore(java.lang.Integer score) {
		this.score = score;
	}
	public void setMemo(java.lang.String memo) {
		this.memo = memo;
	}
	public void setLastupdate(java.sql.Timestamp lastupdate) {
		this.lastupdate = lastupdate;
	}

	//equals method
	public boolean equals(Object other) {
		if (this == other)
			return true;
		if (!(other instanceof CompanyCreditScore))
			return false;

		final CompanyCreditScore creditScore = (CompanyCreditScore)other;
		if (!this.id.equals(creditScore.getId()))
			return false;

		return true;
	}

	//hashCode method
	public int hashCode() {
		StringBuffer keys = new StringBuffer();
		keys.append(id).append(",");
		if (keys.length() > 0)
			keys.deleteCharAt(keys.length() - 1);
		return keys.toString().hashCode();
	}

	//toString method
	public String toString() {
		return new StringBuilder("CompanyCreditScore[")
			.append("id=").append(id).append(", ")
			.append("companyId=").append(companyId).append(", ")
			.append("scoreItem=").append(scoreItem).append(", ")
			.append("score=").append(score).append(", ")
			.append("memo=").append(memo).append(", ")
			.append("lastupdate=").append(lastupdate).append("]").toString();
	}
}